﻿package net.wangit.support.action;

import java.io.OutputStream;

import javax.servlet.http.HttpServletResponse;

import net.wangit.framework.config.GlobalSettings;

/**
 * 读取Blob字段内容。
 * 
 * @author watson
 * Feb 25, 2010
 */
public class BlobOutAction extends BlobDownloadAction {

	private static final long serialVersionUID = 1L;

	public BlobOutAction() {
	}

	protected OutputStream getOutputStream(HttpServletResponse response,
			String fileName, String contentType) throws Exception {
		response
				.setContentType((new StringBuilder(String.valueOf(contentType)))
						.append(";charset=").append(
								GlobalSettings.getEncoding()).toString());
		response.addHeader("Cache-Control", "no-cache");
		response.addHeader("Cache-Control", "no-store");
		return response.getOutputStream();
	}
}
